<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/12/12
  Time: 16:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="layui/css/layui.css" />
    <script src="${pageContext.request.contextPath}/jquery-1.8.3.min.js"></script>
    <script src="${pageContext.request.contextPath}/layui/layui.js"></script>
</head>
<body>
<a href="add.jsp">新增</a>
<div>
    <table class="layui-table">
        <tr>
            <td>类别</td>
            <td>品种</td>
            <td>产地</td>
            <td>总重量(公斤)</td>
            <td>单价(元/公斤)</td>
            <td>操作</td>
        </tr>

        <c:forEach items="${requestScope.list}" var="fruit">
            <tr>
                <td>${fruit.type}</td>
                <td>${fruit.breed}</td>
                <td>${fruit.area}</td>
                <td>${fruit.weight}</td>
                <td>${fruit.price}</td>
                <td>
                    <a href="${pageContext.request.contextPath}/user/${fruit.fruitId}">查看</a>
                        <%--                    <a href="#">详情</a>--%>
                    <a href="${pageContext.request.contextPath}/delete/${fruit.fruitId}">删除</a>

                    <a href="${pageContext.request.contextPath}/update/${fruit.fruitId}">修改</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</div>
</body>
</html>
